package com.kfh.ybracelet.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Aaron on 16/5/18.
 */
public class UserEntity implements Parcelable {

//    public String _id;
    public String phoneNum;
    public String imgUrl;
    public String nickName;
    public String sortLetters;  //显示数据拼音的首字母
//    public boolean isSelect;
//    public boolean hasAdded;


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
//        dest.writeString(this._id);
        dest.writeString(this.phoneNum);
        dest.writeString(this.imgUrl);
        dest.writeString(this.nickName);
        dest.writeString(this.sortLetters);
//        dest.writeByte(isSelect ? (byte) 1 : (byte) 0);
//        dest.writeByte(hasAdded ? (byte) 1 : (byte) 0);
    }

    public UserEntity() {
    }

    protected UserEntity(Parcel in) {
//        this._id = in.readString();
        this.phoneNum = in.readString();
        this.imgUrl = in.readString();
        this.nickName = in.readString();
        this.sortLetters = in.readString();
//        this.isSelect = in.readByte() != 0;
//        this.hasAdded = in.readByte() != 0;
    }

    public static final Parcelable.Creator<UserEntity> CREATOR = new Parcelable.Creator<UserEntity>() {
        @Override
        public UserEntity createFromParcel(Parcel source) {
            return new UserEntity(source);
        }

        @Override
        public UserEntity[] newArray(int size) {
            return new UserEntity[size];
        }
    };
}
